package com.kira.scaffoldmvc.Service;

import com.kira.scaffoldmvc.POJO.*;
import com.kira.scaffoldmvc.POJO.DTO.BookHistoryDTO;
import com.kira.scaffoldmvc.POJO.DTO.UpdateDTO;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Date;
import java.util.List;

public interface BookService {
    Result getTotal( );
    Result getRentCurrentRecord(Date date, Integer Type);

    Result batchBookInsert (Book book);

//这本书转到其他图书馆去了,把书籍状态设置成已转出
    Result Bookout(String bookId);


    Result rentBook(String bookId);


    Result backBook(String bookId,String rentId);

    //分页查询书籍（暂定）

    Result<PageBean<RentBook>>getHistory (String userId, Integer pageNum, Integer pageSize);//查看用户借阅历史

Result<PageBean<Book>> getAllBook(Integer pageNum,Integer pageSize);


    Result InsertBook(Book book);

    Result updateBook(UpdateDTO dto);

    Result getBook(String bookId);

    Result getRent(Integer pageNum, Integer pageSize);

    BookIsbn getByISBN(String isbn);
}
